<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function fn(){
            var s=  parseInt(Math.random()*100000)
            var str=s.toString()
            console.log(str+"是"+str.length+"位数")
            // for(var i=0; i<str.length; i++){
            //     console.log("分别是"+str[i])
            // }
            console.log("分别为："+str.split(","))
        }
        fn()

     
    </script>
</body>
</html>